<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/includes/common-import.jsp"%>
<%@ taglib uri="/page" prefix="p"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<meta charset="utf-8" />
	<title>后台管理系统</title>
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<!-- BEGIN GLOBAL MANDATORY STYLES -->
	<link href="${resPath}media/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="${resPath}media/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
	<link href="${resPath}media/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="${resPath}media/css/style-metro.css" rel="stylesheet" type="text/css"/>
	<link href="${resPath}media/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="${resPath}media/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="${resPath}media/css/default.css" rel="stylesheet" type="text/css" id="style_color"/>
	<link href="${resPath}media/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN PAGE LEVEL STYLES -->
	<link rel="stylesheet" type="text/css" href="${resPath}media/css/select2_metro.css" />
	<link rel="stylesheet" href="${resPath}media/css/DT_bootstrap.css" />
	<!-- END PAGE LEVEL STYLES -->
	<link rel="shortcut icon" href="${resPath}media/image/favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
	<!-- BEGIN HEADER -->
	<%@ include file="/WEB-INF/includes/header.jsp"%>
	<!-- END HEADER -->
	<!-- BEGIN CONTAINER -->
	<div class="page-container row-fluid">
		<!-- BEGIN SIDEBAR -->
		<%@ include file="/WEB-INF/includes/leftMenu.jsp"%>
		<!-- END SIDEBAR -->
		<!-- BEGIN PAGE -->
		<div class="page-content">
			<!-- BEGIN PAGE CONTAINER-->        
			<div class="container-fluid">
				<!-- BEGIN PAGE HEADER-->
				<div class="row-fluid">
					<div class="span12">
						<h3 class="page-title">
							菜单管理
							 <small>系统功能菜单维护</small>
						</h3>
						<!-- END PAGE TITLE & BREADCRUMB-->
					</div>
				</div>
				<!-- END PAGE HEADER-->
				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">
					<div class="span12">
						<form id="searchForm" class="form-horizontal" action="${basePath }system/menu">
							<div class="portlet">
								<div class="portlet-title">
									<div class="input-prepend input-append">
										<span class="add-on"><i class="icon-search"></i></span>
										<input class="m-wrap placeholder-no-fix" type="text" 
											placeholder="菜单名称" id="menuName" name="map['menuName']" value="${searchParams.map['menuName'] }"/>
										<button type="submit" class="btn green pull-right" >查询</button> 
									</div>
									<div class="tools" >
										<a class="expand" href="javascript:;"></a>
									</div>
								</div>
								<div class="portlet-body form hide" style="margin-bottom: 50px;">
									<div class="control-group">
										<label class="control-label">Small Input</label>
										<div class="controls">
											<input class="m-wrap small" type="text" placeholder="small">
											<span class="help-inline">Some hint here</span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">Small Input</label>
										<div class="controls">
											<input class="m-wrap small" type="text" placeholder="small">
											<span class="help-inline">Some hint here</span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">Small Dropdown</label>
										<div class="controls">
											<select tabindex="1" class="small m-wrap">
												<option value="Category 1">Category 1</option>
												<option value="Category 2">Category 2</option>
												<option value="Category 3">Category 5</option>
												<option value="Category 4">Category 4</option>
											</select>
										</div>
									</div>
								</div>
							</div>
						</form>
						<div class="alert alert-success ${empty MESSAGE ?'hide':'' }">
							<button class="close" data-dismiss="alert"></button>
							<span>${MESSAGE }</span>
						</div>
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box light-grey">
							<div class="clearfix">
									<div class="btn-group">
										<a id="sample_editable_1_new" class="btn green" href="${basePath }system/menu/create">
											新增 <i class="icon-plus"></i>
										</a>
									</div>
									<div class="btn-group pull-right">
										<button class="btn dropdown-toggle green" data-toggle="dropdown">
											<i class="icon-cogs"></i> Tools <i class="icon-angle-down"></i>
										</button>
										<ul class="dropdown-menu pull-right">
											<li><a href="#">Print</a></li>
											<li><a href="#">Save as PDF</a></li>
											<li><a href="#">Export to Excel</a></li>
										</ul>
									</div>
								</div>
								<table class="table table-striped table-bordered table-hover" id="sample_1">
									<thead>
										<tr>
											<th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" /></th>
											<th>图标</th>
											<th>菜单名称</th>
											<th>连接地址</th>
											<th class="hidden-480">级别</th>
											<th class="hidden-480">状态</th>
											<th class="hidden-480">上级菜单</th>
											<th ></th>
										</tr>
									</thead>
									<tbody>
										<c:forEach items="${list}" var="list" varStatus="status">
											<tr class="odd gradeX">
												<td><input type="checkbox" class="checkboxes" value="1" /></td>
												<td><img src="${ztreeDiyIconPath }${list.icon }" class="img-rounded"></td>
												<td>${list.menuName }</td>
												<td class="hidden-480"><a href="${basePath }${list.menuLink }">${list.menuLink }</a></td>
												<td class="hidden-480">${list.menuLevel }</td>
												<td class="center hidden-480">${list.useOrUnuse }</td>
												<td class="center hidden-480">${list.pId }</td>
												<td >
													<span class="label label-success">Approved</span>
													<a class="edit" href="${basePath}system/menu/update/${list.id}">Edit</a>
													<a class="edit" href="${basePath}system/menu/delete/${list.id}">Delete</a>
												</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
								<p:page url="user" cpage="${page.cpage }" perItem="${page.perItem }" totalItem="${page.totalItem }"/>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>
			</div>
			<!-- END PAGE CONTAINER-->
		</div>
		<!-- END PAGE -->
	</div>
	<!-- END CONTAINER -->
	<!-- BEGIN FOOTER -->
	<div class="footer">
		<div class="footer-inner">
			2013 &copy; Metronic by keenthemes.
		</div>
		<div class="footer-tools">
			<span class="go-top">
			<i class="icon-angle-up"></i>
			</span>
		</div>
	</div>
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->
	<script src="${resPath}media/js/jquery-1.10.1.min.js" type="text/javascript"></script>
	<script src="${resPath}media/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<script src="${resPath}media/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>      
	<script src="${resPath}media/js/bootstrap.min.js" type="text/javascript"></script>
	<!--[if lt IE 9]>
	<script src="${resPath}media/js/excanvas.min.js"></script>
	<script src="${resPath}media/js/respond.min.js"></script>  
	<![endif]-->   
	<script src="${resPath}media/js/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="${resPath}media/js/jquery.blockui.min.js" type="text/javascript"></script>  
	<script src="${resPath}media/js/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="${resPath}media/js/jquery.uniform.min.js" type="text/javascript" ></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="${resPath}media/js/select2.min.js"></script>
	<script type="text/javascript" src="${resPath}media/js/jquery.dataTables.js"></script>
	<script type="text/javascript" src="${resPath}media/js/DT_bootstrap.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="${resPath}media/js/app.js"></script>
	<script src="${resPath}media/js/table-managed.js"></script>     
	<script>
		jQuery(document).ready(function() {       
		   App.init();
		   //TableManaged.init();
		});
	</script>
</body>
<!-- END BODY -->
</html>